<html>
	<head>
		<meta charset="utf-8" />
		<title>html5新增的布局元素</title>
		{% load static %}
		<script>
		function guangzu(empno){
			// 设置更新博客查询的url请求地址
				url = "/login/emp/xxqk5/" + empno;
				window.location = url;
			}
		function updateId(empno){
			// 设置更新博客查询的url请求地址
			url = "/login/emp/abcde/" + empno;
			window.location = url;
		}
	</script>
    	<link rel="stylesheet" type="text/css" href="{% static 'css/7css.css' %}"/>
	</head>

	<body bgcolor="mediumblue"  background="{% static 'image/t01d61356d326bd0f99.jpg' %}">
		{% include "htm.html" %}
		<form  method="POST" id="updategettFrom" name="updategettFrom"  action="/login/ss1/"  >
            {% csrf_token %}
		<div id="contatiner" style="height: 800px;border: 1px solid gray; margin-top: 5px" >
		<section>
			<a style="float:right;" href="/login/fuanbu/">[发布新文章]</a><a style="float:right;" href="/login/gz/">[我的关注]</a><a style="float:right;" href="/login/an/?page=1">[返回]</a>
			<div class="control-group">
					<label class="control-label" for="number">搜索内容</label>
					<div class="controls">
						<input id="ss"  type="text" placeholder="请输入你要搜索的标题" name="ss" required/>
						<button type="submit" class="btn"> 搜索</button>
					</div>
			</div>
			{% for item in lstemp %}
			<article>
				<h3  style="display:inline;">{{item.title}}</h3><br>
				{% ifequal item.genre '1' %}
				文章类型：<h4  style="display:inline;">技术类</h4>&nbsp;&nbsp;&nbsp;&nbsp;
				{% else %}
				{% ifequal item.genre '2' %}
				文章类型：<h4  style="display:inline;">生活类</h4>&nbsp;&nbsp;&nbsp;&nbsp;
				{% else %}
				{% ifequal item.genre '3'  %}
				文章类型：<h4  style="display:inline;">其它类</h4>&nbsp;&nbsp;&nbsp;&nbsp;
				{% endifequal %}
				{% endifequal %}
				{% endifequal %}
				发布者：<h4 style="display:inline;">{{item.dept.name}}</h4>

				{% autoescape off %}
				<h4 >{{item.artile | truncatechars:25}}<button type="button" id="btnUpdate" class="btnsubmit" onclick="javascript:guangzu({{ item.empno }});">详情</button>	</h4>
				{% endautoescape %}
					
				<br>
			</article>
			{% endfor %}
		</section>
		<!--侧边栏-->
		
		</div>
	
	<p>
		{% if lstemp.has_previous %}
		<a href="?page={{ lstemp.previous_page_number }}">上一页</a>
		{% endif %}

		当前：{{ lstemp.number }} / {{ lstemp.paginator.num_pages }}

		{% if lstemp.has_next %}        
		<a href="?page={{ lstemp.next_page_number }}">下一页</a>
		{% endif %}
	</p>
	{% include "yewb.html" %}
	</form>
	</body>

</html>